import fetch, { BaseResponse } from '@/domain/authority/api';
import { ReqParam, ResData } from '../../types/downLoad';

/**
 * 获取下载列表
 * @returns ResMenu
 */
export async function getDownLoadData(param: ReqParam): Promise<BaseResponse<ResData>> {
  const { data } = await fetch.get<BaseResponse<ResData>>('/xuefu/download/list', { ...param });
  return data;
}

/**
 * 删除下载
 * @returns ResMenu
 */
export async function deleteDownload(download_ids: string): Promise<BaseResponse<string>> {
  const { data } = await fetch.get<BaseResponse<string>>('/xuefu/download/delete', { download_ids });
  return data;
}

export const downLoadUrl= import.meta.env.BASE_URL+'/xuefu/request/download';